package com.cyzy.util;

import lombok.Data;
import lombok.ToString;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Component;

/**
 * @author cuncun
 * @create 2025-05-20 上午10:50
 */
@Data
@Component
@RefreshScope // ✅ 支持 Nacos 动态刷新，确保能拿到值
@ToString
@ConfigurationProperties(prefix = "aliyun.sms")
public class AliyunSmsProperties {

    private String accessKeyId;
    private String accessKeySecret;
    private String signName;
    private String templateCode;

//    @Value("${aliyun.sms.accessKeyId}")
//    private String accessKeyId;
//    @Value("${aliyun.sms.accessKeySecret}")
//    private String accessKeySecret;
//    @Value("${aliyun.sms.signName}")
//    private String signName;
//    @Value("${aliyun.sms.templateCode}")
//    private String templateCode;

}
